<?php


namespace partner\core;

/**
 * Class BaseContainer
 * @package paySdk\core
 */
class BaseContainer extends Container
{
    protected $provider = [];

    public $params = [];

    /**
     * BaseContainer constructor.
     * @param array $params
     */
    public function __construct(array $params = [])
    {
        $this->params = $params;

        array_walk($this->provider, function ($provider) {
            $provider_object = new $provider;
            $this->serviceRegister($provider_object);
        });
    }

    public function __get($id) {
        return $this->offsetGet($id);
    }

}